package businessLogic;

import enums.BLToViewResultMessage;
import businessLogicService.SaleBLService;

public class SaleController implements SaleBLService {

	@Override
	public BLToViewResultMessage addSaleItem(int bookID, int quantity) {
		if (bookID > 0) {
			return BLToViewResultMessage.ADD_SALE_ITEM_SUCCESS;
		}
		return null;
	}

	@Override
	public BLToViewResultMessage removeSaleItem(int bookID) {
		if (bookID > 0) {
			return BLToViewResultMessage.REMOVE_SALE_ITEM_SUCCESS;
		}
		return null;
	}

	@Override
	public BLToViewResultMessage increaseItemQuantity(int bookID) {
		if (bookID > 0) {
			return BLToViewResultMessage.INCREASE_ITEM_QUANTITY_SUCCESS;
		}
		return null;
	}

	@Override
	public BLToViewResultMessage decreaseItemQuantity(int bookID) {
		if (bookID > 0) {
			return BLToViewResultMessage.DECREASE_ITEM_QUANTITY_SUCCESS;
		}
		return null;
	}

	@Override
	public Double getTotal() {
		return 0.0;
	}

	@Override
	public BLToViewResultMessage addGiftUse(int giftID) {
		if (giftID > 0) {
			return BLToViewResultMessage.ADD_GIFT_USE_SUCCESS;
		}
		return null;
	}

	@Override
	public BLToViewResultMessage removeGiftUse(int giftID) {
		if (giftID > 0) {
			return BLToViewResultMessage.REMOVE_GIFT_USE_SUCCESS;
		}
		return null;
	}

	@Override
	public BLToViewResultMessage addAddress(String address) {
		if (address != null) {
			return BLToViewResultMessage.ADD_ADDRESS_SUCCESS;
		}
		return null;
	}

	@Override
	public BLToViewResultMessage finishSale() {
		return BLToViewResultMessage.FINISH_SALE_SUCCESS;
	}

}
